<template>
  <page-frame>
    <div class="content-wrapper">
      <div class="toptitle">
        <div class="left"><span>心电详情</span></div>
        <div class="right">
          <div class="btns">
            <el-button @click="back">返回</el-button>
          </div>
        </div>
      </div>
      <div class="borderT"></div>
      <div class="row"  id="ecgData" v-cloak>
        <div class="col-md-10 col-md-offset-1">
          <!-- START bar chart-->
          <div class="panel panel-default">
            <div class=" pl-xl pr-xl pt-lg">
              <!--<div class="row text-left lh200" v-cloak>-->
                <!--<div class="col col-md-3"><strong class="text-black">患者姓名：</strong>{{ecgData.personName}}</div>-->
                <!--<div class="col col-md-2"><strong class="text-black">年龄：</strong>{{ecgData.age}}</div>-->
                <!--<div class="col col-md-2"><strong class="text-black">性别：</strong>{{ecgData.genderName}}</div>-->
              <!--</div>-->
              <!--<hr class="mt-lg">-->
              <div class="row text-left mt-lg pt">
                <div class="col col-md-12 mb"><span class="text-gray-light1">HR：</span><i class="iconfont icon-love text-red font_16 mr-sm"></i>{{ecgData.heartRate}}pm</div>
                <div class="col col-md-3"><span class="text-gray-light1">P时限：</span>{{ecgData.pwaveT}}ms</div>
                <div class="col col-md-3"><span class="text-gray-light1">PR间期：</span>{{ecgData.pr}}ms</div>
                <div class="col col-md-3"><span class="text-gray-light1">QRS时限：</span>{{ecgData.qrswaveT}}ms</div>
                <div class="col col-md-3"><span class="text-gray-light1">QT/QTC 间期：</span>{{ecgData.qt}}/{{ecgData.qtc}}ms</div>
                <div class="col col-md-6 pt"><span class="text-gray-light1">P/QRS/T 电轴：</span>{{ecgData.pwaveAxis}}/{{ecgData.rwaveAxis}}/{{ecgData.TwaveAxis}}° </div>
                <div class="col col-md-6 pt"><span class="text-gray-light1">RV5/SV1 振幅：</span>{{ecgData.rv5}}/{{ecgData.sv1}}mV </div>
                <div class="col col-md-6 pt"><span class="text-gray-light1">RV6/SV2 振幅：</span>{{ecgData.rv6}}/{{ecgData.sv2}}mV</div>
                <div class="col col-md-6 pt"><span class="text-gray-light1">RV5+SV1 振幅：</span>{{ecgData.rv5SV1}}mV</div>
              </div>
              <!--<div class="row text-left mt-lg">-->
                <!--<div class="col col-md-6 pt">设备提示：{{ecgData.deviceDiagnose}}</div>-->
              <!--</div>-->
              <div class="mt-lg pt"><img :src="ecgData.ecgImageUrl" style="cursor:pointer" width="100%">
              </div>
            </div>
          </div>
          <!-- END bar chart-->
        </div>
      </div>
    </div>
  </page-frame>
</template>

<script>
import healthMonitorApi from '../../service/healthManagement/healthMonitorApi';
export default {
  data() {
    return {
      currentId:null,
      ecgData:{
        personName:'',
        age:'',
        genderName:'',
        heartRate:'',
        PwaveT:'',
        PR:'',
        QRSwaveT:'',
        QT:'',
        QTc:'',
        PwaveAxis:'',
        RwaveAxis:'',
        TwaveAxis:'',
        RV5:'',
        SV1:'',
        RV6:'',
        SV2:'',
        RV5SV1:'',
        deviceDiagnose:'',
        ecgImageUrl:'',
      }
    }
  },
  methods:{
    init(){
      this.currentId = this.$route.params.id;
      this.ECGinfo();
    },
    ECGinfo(){
      let self = this;
      healthMonitorApi.getECGInfo(self.currentId).then(
        (res)=>{
          self.ecgData = res.data.data;
        }
      );
    },
    back(){
      history.back()
    },
  },
  mounted: function () {
    this.init();
  },
}
</script>
<style>

</style>
